﻿#pragma once

static const BYTE c_nPositionArrayNum = 5;

struct _stProvincePosition
{
public:
	_stProvincePosition();
	~_stProvincePosition() = default;
	_stProvincePosition(const _stProvincePosition&) = default;
	_stProvincePosition& operator =(const _stProvincePosition&) = default;

	std::vector<double> position;		// 存x和y坐标 所以大小为c_nPositionArrayNum*2
	std::vector<double> rotation;
	std::vector<double> height;
};

class CProvincePosition
{
	friend class CScriptDataMgr;	// 只有CScriptDataMgr能实例化
public:
	~CProvincePosition() = default;

	const _stProvincePosition* GetProvincePosition(DWORD id) const;
private:
	CProvincePosition() = default;
	CProvincePosition(const CProvincePosition&) = delete;
	CProvincePosition& operator=(const CProvincePosition&) = delete;

	bool IsDataComplete() const;	// 检查map中所有数据是否都不为空

private:
	std::unordered_map<DWORD, _stProvincePosition> m_mapProvincePosition;		// 省份ID做主键
};
